﻿using System;

namespace Faml.Sources.T4D
{
    [OperationContainer]
    public static class T4DOps
    {
        public static T[,,,] txt4d<T>(string path,string variable)
        {
            return new T[1,1,1,1];
        }

        [OperationName("txt1d")]
        public static double[] txt1d(string path, string variable)
        {
            T4DFile tf = new T4DFile(path);
            if (variable == "w")
                return tf.Grid;
            else
                return XDR.XDROperations.xdr1d(tf.Files[0],variable);
        }

        [OperationName("txt4d")]
        public static double[,,,] txt4d(string path, string variable)
        {
            return txt4d<double>(path, variable);
        }
    }
}